<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{overedPriceComparisonBulletinList.firstResult}"></f:viewParam>	
	   	<f:viewParam name="moduleName" value="报价管理"></f:viewParam>
	   	<f:viewParam name="projectName" value="#{overedPriceComparisonBulletinList.parameterValues['projectName']}"></f:viewParam>	
	   	<f:viewParam name="supplierName" value="#{overedPriceComparisonBulletinList.parameterValues['supplierName']}"></f:viewParam>	
	   	<f:viewParam name="buyerName" value="#{overedPriceComparisonBulletinList.parameterValues['buyerName']}"></f:viewParam>
	   	<f:viewParam name="orderBy" value="#{overedPriceComparisonBulletinList.orderBy}"></f:viewParam>	
	   	<f:viewParam name="dir" value="#{overedPriceComparisonBulletinList.dir}"></f:viewParam>
		<f:viewParam name="region" value="#{overedPriceComparisonBulletinList.region}"></f:viewParam>
   	</f:metadata>
   	
    <ui:define name="head">
   	 	<h:outputStylesheet name="/primeicons/primeicons.css" />
    </ui:define>
   
   	<ui:define name="content">
   	   
		<h:form id="searchForm">
			<div style="height:50px;margin-left:10px">				
				<p:outputLabel value="项目名称："></p:outputLabel>				
				<p:inputText value="#{overedPriceComparisonBulletinList.parameterValues['projectName']}"></p:inputText>
				#{'    '}
				<p:outputLabel value="中介名称："></p:outputLabel>				
				<p:inputText value="#{overedPriceComparisonBulletinList.parameterValues['supplierName']}"></p:inputText>
				#{'    '}
				<p:outputLabel value="采购方名称："></p:outputLabel>				
				<p:inputText value="#{overedPriceComparisonBulletinList.parameterValues['buyerName']}"></p:inputText>
				#{'    '}
				<p:outputLabel value="所属县区：" ></p:outputLabel>
				<p:selectOneMenu id="region"
								 value="#{overedPriceComparisonBulletinList.region}">
					<f:selectItem itemLabel="请选择" itemValue="#{null}"  />
					<f:selectItems value="#{codeDicUtils.getCodeDicList('所在地区')}" var="_codeDic" itemValue="#{_codeDic.codeValue}"
								   itemLabel="#{_codeDic.codeName}" />
				</p:selectOneMenu>
				<div class="actionButtons">
					<p:commandButton value="查询" ajax="false" action="OveredPriceComparisonBulletinList.xhtml?faces-redirect=true&amp;includeViewParams=true&amp;firstResult=0" styleClass="blue-int"></p:commandButton>
					<p:button value="重置" outcome="OveredPriceComparisonBulletinList.xhtml"></p:button>
				</div>		
				<div class="clearbt"></div>
			</div>
			<p:panel id="searchResult">
				<f:facet name="header">报价管理</f:facet>
				<p:dataTable value="#{overedPriceComparisonBulletinList.resultList}" var="_bulletin">
					
					<p:column  >
						<f:facet name="header">
							<ui:include src="/manage/template/include/sort.xhtml">
								<ui:param name="entityList" value="#{overedPriceComparisonBulletinList}"/>
			                    <ui:param name="propertyLabel" value="项目名称"/>
			                    <ui:param name="propertyPath" value="projectName"/>
							</ui:include>
						</f:facet>
						#{_bulletin.projectName}
					</p:column>
					
					<p:column >
						<f:facet name="header">
							采购方名称
						</f:facet>
						#{_bulletin.buyer.cnname}
					</p:column>
					<p:column>
						<f:facet name="header">中介名称</f:facet>
						#{_bulletin.successTrade.supplier.cnname}
					</p:column>
					<p:column>
						<f:facet name="header">所属县区</f:facet>
						#{codeDicUtils.getCodeDicValueKeyMap('所在地区')[_bulletin.buyer.region]}
					</p:column>
					<p:column>
						<f:facet name="header">
							操作
						</f:facet>
						<p:button outcome="offerPriceHistory.xhtml" value="查看">
							<f:param name="bulletinId" value="#{_bulletin.id}"></f:param>
						</p:button>
					</p:column>
				</p:dataTable>
			</p:panel>
			
			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{overedPriceComparisonBulletinList}" />
			</ui:include>
			
		</h:form>
      
   	</ui:define>
</ui:composition>
